import Vue from 'vue';
import App from './App.vue';

import vueRouter from 'vue-router';
Vue.use(vueRouter);

import home from './components/home.vue';
import car from './components/shopcar/car.vue';
import newslist from './components/news/newslist.vue';
import newsinfo from './components/news/newsinfo.vue';

var router1 = new vueRouter({
    linkActiveClass: 'mui-active',
    routes: [
        {path: '/', redirect: '/home'},
        {path:'/home',component:home},
        {path:'/shopcar',component:car},
        {path:'/news/newslist',component:newslist},
        {path:'/news/newsinfo/:id',component:newsinfo}

    ]
});
// 导入mint-ui
import 'mint-ui/lib/style.min.css';
import mintUI from 'mint-ui';
Vue.use(mintUI);
// 导入mui相关
import '../statics/mui/css/mui.css'
import '../statics/css/site.css'
// ajax请求服务
import vueResource from 'vue-resource'
Vue.use(vueResource);
// 全局过滤器
import moment from 'moment'
Vue.filter('datefmt',function(input,fmtstring){
    return moment(input).format(fmtstring);
});

new Vue({
    el: '#app',
    router: router1,
    render: c=>c(App)
});